package com.linux.controller;

import com.linux.dataacess.db.ext.LinuxInfoMapper;
import com.linux.dataacess.db.ext.model.LinuxInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/index")
public class IndexController {

    @Autowired
    private LinuxInfoMapper infoMapper;

    @GetMapping("/")
    public List<LinuxInfo>  queryContent() {
        List<LinuxInfo>  all = infoMapper.selectAll();
        return all;
    }



}
